<?php

Route::group(['prefix' => 'mobile'], function(){
	Route::get('/testing', '\App\Mobile\Controllers\HomeController@test');
	Route::get('/index', '\App\Mobile\Controllers\HomeController@index');
	Route::get('/agent_login', '\App\Mobile\Controllers\HomeController@agentLogin');
	Route::get('/guanzhu', '\App\Mobile\Controllers\HomeController@guanzhu');
	Route::get('/agreement', '\App\Mobile\Controllers\HomeController@agreement');
	Route::get('/iphone', '\App\Mobile\Controllers\HomeController@iphone');
	Route::any('/callback', '\App\Mobile\Controllers\HomeController@callback');
	Route::get('/get_code', '\App\Mobile\Controllers\HomeController@getCode');
	Route::get('/cash_code', '\App\Mobile\Controllers\HomeController@cashCode');
	Route::post('/apply', '\App\Mobile\Controllers\HomeController@apply');
	Route::post('/threeapply', '\App\Mobile\Controllers\HomeController@threeapply');//申请3级代理
	Route::post('/superagent_apply', '\App\Mobile\Controllers\HomeController@superApply');
	Route::get('/reapply/{agent}', '\App\Mobile\Controllers\HomeController@reapply');
	Route::get('/share/', '\App\Mobile\Controllers\HomeController@bindAgent');//绑定代理
	Route::get('/seconddvlp/', '\App\Mobile\Controllers\HomeController@secondDvlp');//三级代理绑定二级代理
	Route::get('/download/', '\App\Mobile\Controllers\HomeController@downloadAgent');//扫码公众号用户绑定代理
	Route::get('/home/download/{user}', '\App\Mobile\Controllers\HomeController@downloadGame');
	Route::post('/fill_address/{wxuser}', '\App\Mobile\Controllers\HomeController@fillAddress');//完善公众粉丝地址
	Route::get('/user_location/{user}', '\App\Mobile\Controllers\HomeController@userLocation');//通过百度api获取用户的地址
	Route::get('/first_push_explain/', '\App\Mobile\Controllers\HomeController@firstExplain');//一级代理说明
	Route::get('/second_push_explain/', '\App\Mobile\Controllers\HomeController@secondExplain');//二级代理说明
	Route::get('/bind_second', '\App\Mobile\Controllers\HomeController@bindSecond');//普通用户绑定二级代理
	Route::get('/enter_agent/{user}', '\App\Mobile\Controllers\HomeController@enterAgent');//输入代理id
	Route::post('/enter_agent/{user}', '\App\Mobile\Controllers\HomeController@storeEnter');//输入代理id
	Route::get('/bind_msg', '\App\Mobile\Controllers\HomeController@bindMsg');//通知代理，绑定信息
	Route::get('/red_packet', '\App\Mobile\Controllers\PacketController@sendPacket');//发送红包
	Route::get('/everyday_ticket', '\App\Mobile\Controllers\HomeController@ticket');//领取每日银票
	/*每日银牌*/
	Route::get('/ticket/index/{user}', '\App\Mobile\Controllers\PacketController@index');//领取每日银票
	Route::get('/ticket/take/{user}', '\App\Mobile\Controllers\PacketController@take');//领取银票

	Route::get('/download_game', '\App\Mobile\Controllers\HomeController@download');//非代理发展用户，下载游戏
	Route::get('/is_subscribe', '\App\Mobile\Controllers\HomeController@isSubscribe');//判断用户是否关注公众号
	Route::get('/new_active', '\App\Mobile\Controllers\HomeController@newActive');//最新活动

	Route::get('/worldcup/champion', '\App\Mobile\Controllers\HomeController@wcChampion');//世界杯冠军竞猜
	Route::get('/worldcup/champion_choose/{user}', '\App\Mobile\Controllers\WorldcupController@championChoose');//世界杯冠军竞猜
	Route::post('/worldcup/champion_choose/{user}', '\App\Mobile\Controllers\WorldcupController@storeChoose');//世界杯冠军竞猜
	Route::get('/worldcup/day_guess', '\App\Mobile\Controllers\HomeController@wcDayguess');//世界杯每日竞猜
	Route::get('/worldcup/day_choose/{user}', '\App\Mobile\Controllers\WorldcupController@dayChoose');//世界杯每日竞猜
	Route::post('/worldcup/day_choose/{user}', '\App\Mobile\Controllers\WorldcupController@dayStore');//世界杯每日竞猜
	Route::any('/agent/payBack', '\App\Mobile\Controllers\PaymentController@payBack');//支付异步通知
	/*大赢家消息通知*/
	Route::get('/big_winner', '\App\Mobile\Controllers\HomeController@bigWinner');//大赢家消息通知
	/*温泉票消息通知*/
	Route::get('/adv_voice', '\App\Mobile\Controllers\HomeController@bigWinner');//温泉票消息通知
	/*代理邀请用户加入亲友圈*/
	Route::get('/friend_circle/invite_user', '\App\Mobile\Controllers\HomeController@inviteFriend');//加入亲友圈
	/*微信分享给朋友或朋友圈，引导的用户*/
	Route::get('/wx_share', '\App\Mobile\Controllers\HomeController@wxShare');//邀请用户
	/*转盘抽奖*/
	Route::get('/draw_lottery', '\App\Mobile\Controllers\HomeController@drawLottery');//转盘抽奖
	Route::get('/lottery/index/{user}', '\App\Mobile\Controllers\LotteryController@index');//转盘首页
	Route::get('/lottery/draw_lottery/{user}', '\App\Mobile\Controllers\LotteryController@drawLottery');//抽奖
	/*每日支付*/	
	Route::get('/day_pay', '\App\Mobile\Controllers\HomeController@dayPay');//每日支付
	/*超级代理*/
	Route::get('/super_agent/apply', '\App\Mobile\Controllers\HomeController@superAgentApply');//超级代理申请
	Route::get('/friends_circle/join', '\App\Mobile\Controllers\HomeController@friendCircleJoin');//亲友圈加入通知


	
	/*限制登陆*/
	Route::group(['middleware' => 'mobileLogin'], function(){
		Route::get('/agent/my_son/{agent}', '\App\Mobile\Controllers\AgentController@mySon');//我的下级
		Route::get('/agent/second_agent_son/{agent}', '\App\Mobile\Controllers\AgentController@secondAgentSon');//二级代理下级
		Route::get('/agent/my_user/{agent}', '\App\Mobile\Controllers\AgentController@myUser');//1级代理查看下级玩家
		Route::get('/agent/divide_explain', '\App\Mobile\Controllers\AgentController@explain');//分成比列说明
		Route::get('/agent/my_parent/{agent}', '\App\Mobile\Controllers\AgentController@myParent');//我的上级
		Route::get('/agent/dvlp/{agent}', '\App\Mobile\Controllers\AgentController@development');//发展代理||发展玩家
		Route::get('/agent/second_dvlp/{agent}', '\App\Mobile\Controllers\AgentController@secondDevelopment');//二级代理发展三级代理
		Route::get('/agent/dvlp_user/{agent}', '\App\Mobile\Controllers\AgentController@developUser');//1级代理发展玩家
		Route::get('/agent/mycash/{agent}', '\App\Mobile\Controllers\AgentController@cash');//我的佣金
		Route::get('/agent/withdraw/{agent}', '\App\Mobile\Controllers\AgentController@withdraw');//提现
		Route::post('/agent/withdraw/{agent}', '\App\Mobile\Controllers\AgentController@doWithdraw');//提现
		Route::get('/agent/person/{agent}', '\App\Mobile\Controllers\PersonController@index');//用户中心
		Route::post('/agent/person_add/{agent}', '\App\Mobile\Controllers\PersonController@personAdd');//完善身份信息
		Route::get('/agent/person_address/{agent}', '\App\Mobile\Controllers\PersonController@address');//用户地址
		Route::post('/agent/address_store/{agent}', '\App\Mobile\Controllers\PersonController@addressStore');//保存用户地址
		Route::get('/agent/index/{agent}', '\App\Mobile\Controllers\PersonController@home');//主页
		Route::get('/agent/audit_list/{agent}', '\App\Mobile\Controllers\AgentController@auditList');//审核列表
		Route::get('/agent/do_audit/{agent}', '\App\Mobile\Controllers\AgentController@doAudit');//审核二级代理
		Route::post('/agent/do_audit/{agent}', '\App\Mobile\Controllers\AgentController@passAudit');//审核二级代理
		Route::get('/agent/edit_divide/{agent}', '\App\Mobile\Controllers\AgentController@editDivide');//编辑分成比例
		Route::post('/agent/edit_divide/{agent}', '\App\Mobile\Controllers\AgentController@storeDivide');//编辑分成比例
		Route::get('/agent/first_card/{agent}', '\App\Mobile\Controllers\AgentController@firstCard');//一级代理给二级代理分配房卡
		Route::post('/agent/first_card/{agent}', '\App\Mobile\Controllers\AgentController@storeFirstCard');//一级代理给二级代理分配房卡
		Route::get('/agent/first_log/{agent}', '\App\Mobile\Controllers\AgentController@firstLog');//房卡分配记录
		Route::get('/agent/second_card/{user}', '\App\Mobile\Controllers\AgentController@secondCard');//二级代理给用户分配房卡
		Route::post('/agent/second_card/{user}', '\App\Mobile\Controllers\AgentController@storeSecondCard');//二级代理给用户分配房卡
		Route::get('/agent/second_log/{user}', '\App\Mobile\Controllers\AgentController@secondLog');//房卡分配记录
		Route::get('/agent/open_club/{agent}', '\App\Mobile\Controllers\AgentController@openClub');//开启俱乐部
		Route::post('/agent/open_club/{agent}', '\App\Mobile\Controllers\AgentController@startClub');//开启俱乐部
		Route::get('/agent/my_cash/{agent}', '\App\Mobile\Controllers\AgentController@myCash');//我的佣金
		Route::get('/agent/withdraw_log/{agent}', '\App\Mobile\Controllers\AgentController@withdrawLog');//提现记录
		Route::get('/agent/rebate_log/{agent}', '\App\Mobile\Controllers\AgentController@rebateLog');//佣金记录
		Route::get('/agent/income/{agent}', '\App\Mobile\Controllers\AgentController@income');//收入管理
		Route::get('/agent/agent_info/{agent}', '\App\Mobile\Controllers\AgentController@agentInfo');//代理人详情
		Route::get('/agent/user_info/{user}', '\App\Mobile\Controllers\AgentController@userInfo');//玩家详情
		Route::get('/agent/backhome', '\App\Mobile\Controllers\AgentController@backHome');//返回首页

		Route::get('/agent/charge_active/{agent}', '\App\Mobile\Controllers\AgentController@chargeActive');//充值活动
		Route::get('/agent/add_active', '\App\Mobile\Controllers\AgentController@addActive');//创建活动

		/*充值银票*/
		Route::get('/agent/charge/{agent}', '\App\Mobile\Controllers\PaymentController@index');//充值银票
		Route::get('/agent/payment/', '\App\Mobile\Controllers\PaymentController@payment');//购买下单
		Route::get('/agent/paySuccess', '\App\Mobile\Controllers\PaymentController@paySuccess');//支付成功
		
		/*亲友圈管理*/
		Route::get('/agent/friend_circle/{agent}', '\App\Mobile\Controllers\FriendCircleController@index');//亲友圈人员管理
		Route::get('/agent/friend_circle/control/{agent}', '\App\Mobile\Controllers\FriendCircleController@home');//亲友圈管理
		Route::get('/agent/friend_circle/invite/{agent}', '\App\Mobile\Controllers\FriendCircleController@invite');//邀请用户加入亲友圈
		Route::get('/agent/friend_circle/audit/{clubuser}', '\App\Mobile\Controllers\FriendCircleController@audit');//审核操作
		Route::get('/agent/friend_circle/remove/{clubuser}', '\App\Mobile\Controllers\FriendCircleController@remove');//删除亲友圈用户
		Route::get('/agent/friend_circle/create/{agent}', '\App\Mobile\Controllers\FriendCircleController@create');//创建亲友圈
		Route::post('/agent/friend_circle/store/{agent}', '\App\Mobile\Controllers\FriendCircleController@store');//保存亲友圈
		Route::get('/agent/friend_circle/buy/{agent}', '\App\Mobile\Controllers\PaymentController@circlePurchase');//购买亲友圈套餐
		/*给二级代理开启会员亲友圈*/
		Route::get('/agent/open_friend_cricle/{agent}', '\App\Mobile\Controllers\FriendCircleController@open');//给二级代理开启会员亲友圈
		/*桌子管理*/
		Route::get('/agent/rooms/{agent}', '\App\Mobile\Controllers\RoomController@index');
		Route::post('/agent/rooms/diss_room', '\App\Mobile\Controllers\RoomController@dissRoom');
		/*每日支付*/	
		Route::get('/agent/day_pay', '\App\Mobile\Controllers\PaymentController@dayPay');//每日支付
	});

	/*超级管理员限制登录*/
	Route::group(['middleware' => 'agentLogin'], function(){
		/*超级代理*/
		Route::get('/superagent/index', '\App\Mobile\Controllers\SuperAgentController@index');//超级代理首页
		Route::get('/superagent/dvlp/{agent}', '\App\Mobile\Controllers\SuperAgentController@dvlp');//超级代理首页
		Route::get('/superagent/audit_list/{agent}', '\App\Mobile\Controllers\SuperAgentController@auditList');//一级代理申请页面
		Route::get('/superagent/do_audit/{agent}', '\App\Mobile\Controllers\SuperAgentController@doAudit');//审核代理
		Route::post('/superagent/do_audit/{agent}', '\App\Mobile\Controllers\SuperAgentController@storeAudit');//审核代理
		Route::get('/superagent/my_son/{agent}', '\App\Mobile\Controllers\SuperAgentController@myson');//我发展的一级代理
		Route::get('/superagent/first_card/{agent}', '\App\Mobile\Controllers\SuperAgentController@firstCard');//给代理分配银票
		Route::post('/superagent/first_card/{agent}', '\App\Mobile\Controllers\SuperAgentController@storeFirstCard');//给代理分配银票
		Route::get('/superagent/first_log/{agent}', '\App\Mobile\Controllers\SuperAgentController@firstLog');//分配银票记录
		Route::get('/superagent/edit_divide/{agent}', '\App\Mobile\Controllers\SuperAgentController@editDivide');//修改分成比例
		Route::post('/superagent/edit_divide/{agent}', '\App\Mobile\Controllers\SuperAgentController@storeDivide');//修改分成比例
		Route::get('/superagent/open_friend_cricle/{agent}', '\App\Mobile\Controllers\SuperAgentController@openCircle');//开启会员亲友圈
		Route::get('/superagent/income/{agent}', '\App\Mobile\Controllers\SuperAgentController@income');//收入管理
		Route::get('/superagent/withdraw_log/{agent}', '\App\Mobile\Controllers\SuperAgentController@withdrawLog');//提现记录
		Route::get('/superagent/withdraw/{agent}', '\App\Mobile\Controllers\SuperAgentController@withdraw');//提现
		Route::post('/superagent/withdraw/{agent}', '\App\Mobile\Controllers\SuperAgentController@doWithdraw');//提现
		
		
	});
	
});